<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/album_detail.css" />
<div id="album-info">
    <img class="user-img" src="images/profile-photo.jpg" />
    <h2><?php echo $model->ten_album; ?></h2>
    <span class="detail">Album được đăng bởi <a href="#" class="user-link"><?php echo $model->idThanhVien->ten_dang_nhap; ?></a> | <?php echo count($model->hinhs); ?> ảnh | <?php echo count($model->binhLuanAlbums); ?> bình luận</span>
    <span class="light-box">Xem bằng:&nbsp;<a href="index.php?r=site/Lightbox&id=<?php echo $model->id; ?>" class="light-box-link">Lightbox</a></span>
</div>
<div class="right float-thumbnail">
    <div id="album-thumbnails" class="photos nano">
        <div id="thumbnail-header">
            <a href="#comment-form" class="light-box-link" style="float:none;">Bình luận</a>
            <a href="index.php?r=site/Lightbox&id=<?php echo $model->id; ?>" class="light-box-link">Lightbox</a>
        </div>
        <div class="content">
            <?php
            $this->widget('zii.widgets.CListView', array(
                'dataProvider' => $hinh->search(),
                'itemView' => '_albumThumbnailItem',
                'template' => '{items}',
                'enablePagination' => false,
            ));
            ?>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {

        var $container = $('#album-thumbnails .content');

        $container.imagesLoaded(function () {
            $container.isotope({
                itemSelector: '.photo'
            });
        });
    });
</script>
<div class="left">
    <div id="images">
        <?php
        $this->widget('zii.widgets.CListView', array(
            'dataProvider' => $hinh->search(),
            'itemView' => '_albumBigImage',
            'template' => '{items}',
            'enablePagination' => false,
        ));
        ?>
    </div>
    <div id="comment">
        <h2>Bình luận</h2>
        <ul>
            <?php
            $this->widget('zii.widgets.CListView', array(
                'dataProvider' => $binh_luan->search(),
                'itemView' => '_albumCommentItem',
                'template' => '{items}',
                'emptyText' => '',
            ));
            ?>
        </ul>
        <div id="comment-form">


            <?php
            if (isset(Yii::app()->user->id)) {
                $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'comment-fform',
                    'enableAjaxValidation' => true,
                    'enableClientValidation' => true,
                        ));
                ?>
                <img class="user-img" src="images/profile-photo.jpg" />
                <?php echo $form->textArea($binh_luan, 'noi_dung', array('placeholder' => 'Nhập nội dung bình luận')); ?>
                <?php echo CHtml::submitButton('Bình luận'); ?>
                <div class="clear"></div>


                <?php
                $this->endWidget();
            } else {
                echo "&nbsp;&nbsp;&nbsp;&nbsp;Bạn cần đăng nhập để bình luận!";
            }
            ?>


        </div>
    </div>
</div>
<div class="clear" />
